package org.lanqiao.netctoss.controller.acount;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.lanqiao.netctoss.entity.Acount;
import org.lanqiao.netctoss.entity.Tariff;
import org.lanqiao.netctoss.service.impl.AcountServiceImpl;

/**
 * Servlet implementation class DetailAcoServlet
 */
public class DetailAcoServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public DetailAcoServlet() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub		
		request.setCharacterEncoding("utf-8");
		response.setCharacterEncoding("utf-8");
		int aco_no = Integer.parseInt(request.getParameter("aco_no"));
		//List<Acount> la = new AcountBussImpl().selectAcountByno(new Acount(aco_no));
		List<Acount> la = new AcountServiceImpl().selectAcountByno(new Acount(aco_no));
		request.getSession().setAttribute("la",la);
		request.getRequestDispatcher("../view/account/account_detail.jsp").forward(request, response);
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
